package com.example.volunteeroa.repository;

import com.example.volunteeroa.entity.Venue;
import com.example.volunteeroa.entity.Volunteer;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;
import java.util.List;

@Repository
public interface VenueRepository extends JpaRepository<Venue,Integer>, JpaSpecificationExecutor<Venue>{

//    @Query("select e from Venue e where e.venueID=?1")
//    List<Venue>findByVenueID(Integer venueId);
//
//    @Transactional
//    @Modifying
//    @Query(value="delete from Venue where venueId=?1 ",nativeQuery = true)
//    void deleteVenue(Integer venueId);
//    //通过场馆号以及名字删除一个场馆的信息
//
//    @Modifying
//    @Transactional
//    @Query(value = "update Venue e set e.volunteerNum=?2 where e.venueID=?1")
//    void UpdateNumOfVolunteers(Integer venueID,Integer volunteerNum);
//    //修改该场馆下志愿者数量

}